home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / vbcc / machines / amiga68k / libsrc / extra / getch.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-24  |  363 b   |  18 lines

  1. /*  Very simple implementation of getch for vbcc - use at own risk! */
  2. /*  Strange things may happen (or not) if stdin is not tty or getch */
  3. /*  is mixed with buffered io.                                      */
  4.  
  5. #include <stdio.h>
  6.  
  7. int getch()
  8. {
  9.     int k;
  10.     SetMode(stdin->filehandle,1);
  11.     k=getchar();
  12.     SetMode(stdin->filehandle,0);
  13.     return k;
  14. }
  15.  
  16.  
  17.  
  18.